all: testProto test Result 

testProto:test.proto
	protoc --cpp_out=./ -I/usr/local/protobuf/include/ -I./ test.proto

test:test.pb.cc test.pb.h test.proto
	g++ -std=c++11 -c -otest.o -I /usr/local/protobuf/include/ -L /usr/local/protobuf/lib/ test.pb.cc -lprotobuf

Result:test.cpp test.o 
	g++ -std=c++11 -oResult  -I /usr/local/protobuf/include/ -L /usr/local/protobuf/lib/ test.cpp test.o -lprotobuf 

clean:
	rm *.pb.* Result test.o -rf
